{template '_header'}
<style type="text/css">
	.fui-navbar ~ .fui-content, .fui-content.navbar{padding:0;}
	.fui-cell-group{margin-top:0;}
</style>
<link rel="stylesheet" href="../addons/ewei_shopv2/plugin/creditshop/template/mobile/default/images/common.css" />
<div class='fui-page fui-page-current creditshop-creditlog-page'>
		<div class="fui-header">
				<div class="fui-header-left">
						<a class="back"></a>
				</div>
				<div class="title">参与记录</div>
				<div class="fui-header-right"></div>
		</div>
		
		<div class='fui-content navbar'>
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-icon"><i class="icon icon-jifen"></i></div>
					<div class="fui-cell-text"><p>我的{$_W['shopset']['trade']['credittext']}: {$credit}</p></div>
					 {if !empty($this->set['crediturl'])}
					 	<a href="{php echo $this->set['crediturl']}" class="external">
					 		<div class="fui-cell-remark">{$_W['shopset']['trade']['credittext']}说明</div>
					 	</a>
					{/if}
		 	 	</div>
			 </div>
		 
		 	<div class="fui-message fui-message-popup in content-empty" style="display: none; margin: 0; padding: 0; position: relative;">
				<div class="icon ">
					<i class="icon icon-information"></i>
				</div>
				<div class="content">未找到参与记录~</div>
			</div>
		
			<div class="fui-list-group noborder nomargin container"></div>
	    	<div class='infinite-loading' style="text-align: center; color: #666;">
	    		<span class='fui-preloader'></span>
	    		<span class='text'> 正在加载...</span>
	    	</div>			
		</div>
		<script id='tpl_creditshop_creditlog_list' type='text/html'>
				<%each list as item%>
					<%if item.type==0%>
						<a class="fui-list" href="{php echo mobileUrl('creditshop/log')}">
							<div class="fui-list-media">
								<img src="<%item.thumb%>">
								<div class="title warning">兑 换</div>
							</div>
							<div class="fui-list-inner">
								<div class="title"><%item.title%></div>
								<div class="text"><%item.createtime%></div>
							</div>
							<div class="fui-list-media" style="display:block;display:block;display:block;font-size:0.7rem;text-align: right;">
								<p class="text-danger">-<%item.credit%>{$_W['shopset']['trade']['credittext']}</p>
								<p>已兑换</p>
							</div>
						</a>
					<%else%>
						<a class="fui-list" href="<%if item.status>1%>{php echo mobileUrl('creditshop/log')}<%else%>javascript:;<%/if%>">
							<div class="fui-list-media">
								<img src="<%item.thumb%>">
								<div class="title danger">抽 奖</div>
							</div>
							<div class="fui-list-inner">
								<div class="title"><%item.title%></div>
								<div class="text"><%item.createtime%></div>
							</div>
							<div class="fui-list-media" style="display:block;display:block;display:block;font-size:0.7rem;text-align: right;">
								<p class="text-danger" style="background: none;">-<%item.credit%>{$_W['shopset']['trade']['credittext']}</p>
								<%if item.status==1%>
									<p style="color: #666;">未中奖</p>
								<%/if%>
								<%if item.status>1%>
									<p class="text-danger">已中奖</p>
								<%/if%>
							</div>
						</a>
					<%/if%>
				<%/each%>
		</script>
		<script language="javascript">
		require(['../addons/ewei_shopv2/plugin/creditshop/static/js/creditlog.js'],function(modal){
			modal.init();
		});
	</script>
</div>
{php $this->footerMenus()}
{template '_footer'}